
const crypto = require('crypto');

const md5Password = (password) => {
    const md5 = crypto.createHash('md5');
    // digest() 默认返回的是buffer  digest('hex') 返回的是十六进制
    return md5.update(password).digest('hex');
}

module.exports = md5Password;